//
//  SimpleView.swift
//  C022_test_simple_uiview_subclass_init
//
//  Created by yao_yu on 15/7/15.
//  Copyright © 2015年 yao_yu. All rights reserved.
//

import UIKit


//在调用init()时, 会调用init(frame:CGRectZero), 因此子类派生时, 只需要实现override init(frame: CGRect)
class SimpleView: UIView {

    var containerView = UIView()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        print(frame)
        self.addSubview(containerView)
        print("Init")
    }

    required init(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        self.addSubview(containerView)
        print("Init2")
    }

}
